package com.qiwenshare.file.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import javax.persistence.Id;
import java.time.LocalDateTime;

/**
 * @author CZF
 * @create 2024-01-22 0:59
 */
@Data
public class ClickRecord {
    @Id
    @TableId(type = IdType.AUTO)
    private long id;
    @TableField(value = "user_id")
    private String userId;
    private LocalDateTime time;
    private String type;

    public static ClickRecord newOne(String userId) {
        ClickRecord clickRecord = new ClickRecord();
        clickRecord.userId = userId;
        clickRecord.time = LocalDateTime.now();
        clickRecord.type = "点击";
        return clickRecord;


    }
}
